import axios from "axios";
 function aiChat(reqs,res,next){
    axios({
        method: 'post',
        headers:{
            'Content-Type':'application/json',
            'Authorization':'Bearer +‘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’'
        },
        url: 'https://api.openai-proxy.com/v1/chat/completions',
        data: {
            "model": "gpt-3.5-turbo",
            "messages": [{"role": 'user', "content": reqs.text}],
            "temperature": 0.7
        }
    }).then((res)=>{
        return res;
    })
}
export default {
    aiChat,
};
